package com.cyan.app.workflow.util;

/**
 * Created by DXW on 2016/1/13.
 */
public class ClickUtil {
    private static long lastClickTime;
    public synchronized static boolean isFastClick() {
        long time = System.currentTimeMillis();
        if ( time - lastClickTime < 1000) {
            return true;
        }
        lastClickTime = time;
        return false;
    }
    public synchronized static boolean isFastClick(int s) {
        long time = System.currentTimeMillis();
        if ( time - lastClickTime < s*1000) {
            return true;
        }
        lastClickTime = time;
        return false;
    }
}
